.class public Lnbisdk/v;
.super Ljava/lang/Object;

# interfaces
.implements Lnbisdk/jy;


# instance fields
.field private K:Lcom/nbi/location/LocationListener;


# direct methods
.method public constructor <init>()V
    .locals 0

    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method

.method public constructor <init>(Lcom/nbi/location/LocationListener;)V
    .locals 0

    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    if-nez p1, :cond_0

    :goto_0
    return-void

    :cond_0
    iput-object p1, p0, Lnbisdk/v;->K:Lcom/nbi/location/LocationListener;

    goto :goto_0
.end method


# virtual methods
.method public final a(ILnbisdk/ow;)V
    .locals 1

    iget-object v0, p0, Lnbisdk/v;->K:Lcom/nbi/location/LocationListener;

    if-nez v0, :cond_0

    :goto_0
    return-void

    :cond_0
    iget-object v0, p0, Lnbisdk/v;->K:Lcom/nbi/location/LocationListener;

    invoke-interface {v0, p1}, Lcom/nbi/location/LocationListener;->onLocationError(I)V

    goto :goto_0
.end method

.method public final a(Lnbisdk/ei;Lnbisdk/ow;)V
    .locals 8

    const/4 v4, 0x0

    const-wide/16 v6, 0x0

    iget-object v0, p0, Lnbisdk/v;->K:Lcom/nbi/location/LocationListener;

    if-nez v0, :cond_1

    :cond_0
    :goto_0
    return-void

    :cond_1
    invoke-virtual {p1}, Lnbisdk/ei;->ea()Lnbisdk/cs;

    move-result-object v0

    invoke-virtual {v0}, Lnbisdk/cs;->getLatitude()D

    move-result-wide v0

    invoke-virtual {p1}, Lnbisdk/ei;->ea()Lnbisdk/cs;

    move-result-object v2

    invoke-virtual {v2}, Lnbisdk/cs;->getLongitude()D

    move-result-wide v2

    cmpl-double v5, v0, v6

    if-eqz v5, :cond_2

    cmpl-double v5, v2, v6

    if-eqz v5, :cond_2

    const-wide v5, 0x4056800000000000L

    cmpl-double v5, v0, v5

    if-gtz v5, :cond_2

    const-wide v5, -0x3fa9800000000000L

    cmpg-double v0, v0, v5

    if-ltz v0, :cond_2

    const-wide v0, 0x4066800000000000L

    cmpl-double v0, v2, v0

    if-gtz v0, :cond_2

    const-wide v0, -0x3f99800000000000L

    cmpg-double v0, v2, v0

    if-gez v0, :cond_5

    :cond_2
    move v0, v4

    :goto_1
    if-eqz v0, :cond_0

    new-instance v6, Lcom/nbi/location/Location;

    invoke-direct {v6}, Lcom/nbi/location/Location;-><init>()V

    if-eqz p1, :cond_3

    if-nez v6, :cond_6

    :cond_3
    :goto_2
    const/4 v0, 0x0

    invoke-static {v0}, Lnbisdk/bd;->b(Lcom/nbi/common/NBIContext;)Lnbisdk/hi;

    move-result-object v0

    if-eqz v0, :cond_4

    invoke-interface {v0, v6}, Lnbisdk/hi;->c(Lcom/nbi/location/Location;)V

    :cond_4
    iget-object v0, p0, Lnbisdk/v;->K:Lcom/nbi/location/LocationListener;

    invoke-interface {v0, v6}, Lcom/nbi/location/LocationListener;->locationUpdated(Lcom/nbi/location/Location;)V

    sget-boolean v0, Lnbisdk/bk;->cG:Z

    if-eqz v0, :cond_0

    invoke-static {p1}, Lnbisdk/cq;->a(Lnbisdk/ei;)V

    goto :goto_0

    :cond_5
    const/4 v0, 0x1

    goto :goto_1

    :cond_6
    invoke-virtual {p1}, Lnbisdk/ei;->ea()Lnbisdk/cs;

    move-result-object v0

    invoke-virtual {v0}, Lnbisdk/cs;->getLatitude()D

    move-result-wide v0

    invoke-virtual {v6, v0, v1}, Lcom/nbi/location/Location;->setLatitude(D)V

    invoke-virtual {p1}, Lnbisdk/ei;->ea()Lnbisdk/cs;

    move-result-object v0

    invoke-virtual {v0}, Lnbisdk/cs;->getLongitude()D

    move-result-wide v0

    invoke-virtual {v6, v0, v1}, Lcom/nbi/location/Location;->setLongitude(D)V

    invoke-virtual {p1}, Lnbisdk/ei;->getAccuracy()I

    move-result v0

    invoke-virtual {v6, v0}, Lcom/nbi/location/Location;->setAccuracy(I)V

    const/16 v0, 0x83

    invoke-virtual {v6, v0}, Lcom/nbi/location/Location;->setValid(I)V

    sget-boolean v0, Lnbisdk/bk;->cG:Z

    if-eqz v0, :cond_3

    invoke-virtual {p1}, Lnbisdk/ei;->ea()Lnbisdk/cs;

    move-result-object v0

    invoke-virtual {v0}, Lnbisdk/cs;->getLongitude()D

    move-result-wide v0

    invoke-virtual {p1}, Lnbisdk/ei;->ea()Lnbisdk/cs;

    move-result-object v2

    invoke-virtual {v2}, Lnbisdk/cs;->getLatitude()D

    move-result-wide v2

    const/4 v5, 0x2

    invoke-static/range {v0 .. v5}, Lnbisdk/et;->a(DDSB)V

    goto :goto_2
.end method

.method public final onRequestCancelled(Lcom/navbuilder/nb/b;)V
    .locals 2

    iget-object v0, p0, Lnbisdk/v;->K:Lcom/nbi/location/LocationListener;

    const/16 v1, 0x7d0

    invoke-interface {v0, v1}, Lcom/nbi/location/LocationListener;->onLocationError(I)V

    return-void
.end method

.method public final onRequestComplete(Lcom/navbuilder/nb/b;)V
    .locals 0

    return-void
.end method

.method public final onRequestError(Lcom/navbuilder/nb/NBException;Lcom/navbuilder/nb/b;)V
    .locals 6

    const-wide/16 v0, 0x0

    if-eqz p1, :cond_1

    iget-object v2, p0, Lnbisdk/v;->K:Lcom/nbi/location/LocationListener;

    invoke-virtual {p1}, Lcom/navbuilder/nb/NBException;->getErrorCode()I

    move-result v3

    invoke-interface {v2, v3}, Lcom/nbi/location/LocationListener;->onLocationError(I)V

    new-instance v2, Ljava/lang/StringBuilder;

    invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V

    const-string v3, "Netwrklocation Error: "

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    invoke-virtual {p1}, Lcom/navbuilder/nb/NBException;->getErrorCode()I

    move-result v3

    invoke-static {v3}, Ljava/lang/Integer;->toString(I)Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v2

    sget-boolean v3, Lnbisdk/bk;->cG:Z

    if-eqz v3, :cond_0

    invoke-static {v2}, Lnbisdk/cq;->I(Ljava/lang/String;)V

    invoke-virtual {p1}, Lcom/navbuilder/nb/NBException;->getErrorCode()I

    move-result v2

    int-to-short v4, v2

    const/4 v5, 0x2

    move-wide v2, v0

    invoke-static/range {v0 .. v5}, Lnbisdk/et;->a(DDSB)V

    :cond_0
    :goto_0
    return-void

    :cond_1
    iget-object v0, p0, Lnbisdk/v;->K:Lcom/nbi/location/LocationListener;

    const/16 v1, 0x2346

    invoke-interface {v0, v1}, Lcom/nbi/location/LocationListener;->onLocationError(I)V

    goto :goto_0
.end method

.method public final onRequestProgress(ILcom/navbuilder/nb/b;)V
    .locals 0

    return-void
.end method

.method public final onRequestStart(Lcom/navbuilder/nb/b;)V
    .locals 0

    return-void
.end method

.method public final onRequestTimedOut(Lcom/navbuilder/nb/b;)V
    .locals 2

    iget-object v0, p0, Lnbisdk/v;->K:Lcom/nbi/location/LocationListener;

    const/16 v1, 0x2348

    invoke-interface {v0, v1}, Lcom/nbi/location/LocationListener;->onLocationError(I)V

    sget-boolean v0, Lnbisdk/bk;->cG:Z

    if-eqz v0, :cond_0

    const-string v0, "NetworkLocation Error: Timeout"

    invoke-static {v0}, Lnbisdk/cq;->I(Ljava/lang/String;)V

    :cond_0
    return-void
.end method
